﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfBProducto.aspx.cs" Inherits="NovaSystem.InterfazUsuarioWeb.Logistica.wfBProducto" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<%@ Register assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <base target=_self>
    <title>Productos</title>
    <link rel="Stylesheet" type="text/css" href="../styles/system.css" />
    <script type="text/javascript" src="../javascript/jsFunciones.js"></script>
    <script language="javascript" type="text/javascript">
        var EmptyDataText = "No Records Found"
        function ShowEmptyDataHeader() {
            var Grid = document.getElementById("<%=gvDetalle.UniqueID%>");
            if (Grid != null) {
                //var cell = Grid.getElementsByTagName("TD")[0];
                //if (cell != null && cell.innerHTML == EmptyDataText) {
                //if (cell.innerHTML != '') {
                document.getElementById("divEncabezado").style.display = "none";
            }
        }

        window.onload = ShowEmptyDataHeader;
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table cellpadding="0" cellspacing="0" border="0" width="760px" class="tabla">
        <tr>
        <td colspan="10" background="<%= Page.ResolveUrl("~")%>img/separadormenu.png">
        <asp:TextBox ID="txtSeparadorEnc" style="visibility:hidden" runat="server"></asp:TextBox>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
        </td>
        </tr>
        <tr>
        <td><br /></td>
        </tr>
        <tr>
        <td>Categoria</td>
        <td><asp:DropDownList runat="server" ID="ddlCategoria"></asp:DropDownList></td>
        <td>Familia</td>
        <td><asp:DropDownList runat="server" ID="ddlFamilia"></asp:DropDownList></td>
        </tr>
        <tr>
        <td>Código</td>
        <td><asp:TextBox runat="server" ID="txtCodigo"></asp:TextBox></td>
        <td>Descripción</td>
        <td><asp:TextBox runat="server" ID="txtDescripcion"></asp:TextBox></td>
        <td><asp:Button runat="server" ID="btnBuscar" Text="Buscar" 
                onclick="btnBuscar_Click" /></td>
        </tr>
        <tr>
        <td colspan="10" background="<%= Page.ResolveUrl("~")%>img/separador.png">
    
        <asp:TextBox ID="txtSeparadorPie" style="visibility:hidden" runat="server" 
            Height="17px"></asp:TextBox>
    
        </td>
        </tr>
        </table>
        
        <table cellpadding="0" cellspacing="0" border="0" width="760px" class="tabla">
        <tr>
            <td colspan="10" background="<%= Page.ResolveUrl("~")%>img/separadormenu.png">
                <asp:TextBox ID="txtSeparadorEncDet" style="visibility:hidden" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
        <td colspan="10">
            <div id="divEncabezado">
            <table class="mGrid">
            <tr>
            <th>Código</th>
            <th>Descripción</th>
            <th>Categoria</th>
            <th>Familia</th>
            </tr>
            <tr>
            <td colspan="10" align="center">Sin registros</td>
            </tr>
            </table>
            </div>
        </td>
        </tr>
        <tr>
        <td>
        <div>
        <asp:GridView runat="server" ID="gvDetalle" CssClass="mGrid" 
                AutoGenerateColumns="False" onrowdatabound="gvDetalle_RowDataBound">
            <Columns>
                <asp:BoundField DataField="idProducto" HeaderText="idProducto" />
                <asp:BoundField DataField="codigo" HeaderText="Codigo" />
                <asp:BoundField DataField="descripcion" HeaderText="Descripcion" />
                <asp:BoundField DataField="codigoCategoria" HeaderText="Categoria" />
                <asp:BoundField DataField="codigoFamilia" HeaderText="Familia" />
            </Columns>
            </asp:GridView>
        </div>
        </td>
        </tr>
        <tr>
        <td align="center">
        <asp:Button runat="server" ID="btnNuevo" Text="Nuevo" /> &nbsp; <asp:Button runat="server" ID="btnCancelar" Text="Cancelar" />
            </td>
        </tr>
        <tr>
        <td colspan="10" background="<%= Page.ResolveUrl("~")%>img/separador.png">
    
        <asp:TextBox ID="txtSeparadorPieDet" style="visibility:hidden" runat="server" 
            Height="17px"></asp:TextBox>
    
        </td>
        </tr>
        </table>
    </div>
    <cc1:ModalPopupExtender ID="mpeNuevo"
        TargetControlID="btnNuevo" 
    PopupControlID="pnlNuevoProducto"
    CancelControlID="btnCancelarNew"
    DropShadow="true"
    BackgroundCssClass="fondoDisabled"
     runat="server">
        </cc1:ModalPopupExtender>
    <div>
        
    <asp:Panel runat="server" ID="pnlNuevoProducto">
    <table cellpadding="0" cellspacing="0" border="0" width="700px" class="tabla">
    <tr>
    <td align="center" colspan="4" 
            background="<%= Page.ResolveUrl("~")%>img/separadormenu.png">
    
        <asp:Label ID="lblTituloSeparadorNew" runat="server" 
            Height="17px" Font-Bold="True">INGRESAR NUEVO PRODUCTO</asp:Label>
    
        &nbsp;</td>
    </tr>
    <tr>
    <td><br /></td>
    </tr>
    <tr>
    <td>Código</td>
    <td><asp:TextBox runat="server" id="txtCodigoNew"></asp:TextBox> </td>
    <td>Descripción</td>
    <td><asp:TextBox runat="server" id="txtDescripcionNew" Width="294px"></asp:TextBox> </td>
    </tr>
    <tr>
    <td>Categoría</td>
    <td><asp:DropDownList runat="server" ID="ddlCategoriaNew" DataTextField="descripcion" 
            DataValueField="codigo"></asp:DropDownList></td>
    <td>Familia</td>
    <td><asp:DropDownList runat="server" ID="ddlFamiliaNew" DataTextField="descripcion" 
            DataValueField="codigo"></asp:DropDownList></td>
    </tr>
    
    <tr>
    <td><br /></td>
    </tr>
    <tr>
    <td colspan="4" align="center"><asp:Button runat="server" Text="Grabar" 
            ID="btnGrabarNew" onclick="btnGrabarNew_Click" />
        &nbsp;&nbsp;
        <asp:Button ID="btnCancelarNew" runat="server" Text="Cancelar" />
        </td>
    </tr>
    <tr>
        <td>
            <br />
        </td>
        </tr>
    <tr>
    <td colspan="4" background="<%= Page.ResolveUrl("~")%>img/separador.png">
    
        <asp:TextBox ID="txtSeparadorPieNew" style="visibility:hidden" runat="server" 
            Height="17px"></asp:TextBox>
    
    </td>
    </tr>
    </table>
    
    </asp:Panel>   

    </div>
    
    
    </form>
</body>
</html>
